﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Components.Data
{
    public class Item
    {
        private int pItemId;
        private int pItemNum;
        private int pOption;
        private byte pResist;
        private int pResistOption;
        private byte pFlag;

        public int ItemId
        {
            get { return pItemId; }
        }

        public int Count
        {
            get { return pItemNum; }
        }

        public int Load(string dbString)
        {
            string[] data = dbString.Split(',');
            pItemId = Convert.ToInt32(data[1]);
            pItemNum = Convert.ToInt32(data[5]);
            pOption = Convert.ToInt32(data[12]);
            pResist = Convert.ToByte(data[13]);
            pResistOption = Convert.ToInt32(data[14]);
            pFlag = Convert.ToByte(data[10]);
            return Convert.ToInt32(data[0]);
        }
    }
}
